//
// Created by wze-zero on 2024/8/2 002.
//
#include <iostream>

using namespace std;

int main() {
    float num, m;
    int n;
    cin >> num;
    n = (int) num;
    m = num - (float) n;
    if (m > 0) {
        n = m > 0.5 ? n + 1 : n;
    } else {
        n = m < -0.5 ? n - 1 : n;
    }
    cout << n << endl;
}